package com.example.demo.entity;


import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class LoginResponse {
    private boolean success;      // 登录是否成功
    private String userId;        // 学生学号
    private String userName;      // 学生姓名
    private String token;         // JWT令牌

    // 无参构造
    public LoginResponse() {}

    // 全参构造
    public LoginResponse(boolean success, String userId, String userName, String token) {
        this.success = success;
        this.userId = userId;
        this.userName = userName;
        this.token = token;
    }

    // getter和setter
    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}